package com.mywork.mvpkodeinxml.di

import com.mywork.mvpkodeinxml.presenter.MainPresenter
import com.mywork.mvpkodeinxml.net.service.CommonService
import com.mywork.mvpkodeinxml.net.service.DownloadService
import com.mywork.mvpkodeinxml.net.service.UploadService
import org.kodein.di.Kodein
import org.kodein.di.generic.bind
import org.kodein.di.generic.provider
import org.kodein.di.generic.singleton

val appKodeinModule = Kodein.Module("App Module") {
    bind<CommonService>() with singleton { CommonService() }
    bind<UploadService>() with singleton { UploadService() }
    bind<DownloadService>() with singleton { DownloadService() }

    bind<MainPresenter>() with provider { MainPresenter(kodein) }
}